<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * Thirdparties filter form base class.
 *
 * @package    tvpv
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 13459 2008-11-28 14:48:12Z fabien $
 */
class BaseThirdpartiesFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'cif'          => new sfWidgetFormFilterInput(),
      'name'         => new sfWidgetFormFilterInput(),
      'address'      => new sfWidgetFormFilterInput(),
      'contactcomm'  => new sfWidgetFormFilterInput(),
      'contactfact'  => new sfWidgetFormFilterInput(),
      'payrule'      => new sfWidgetFormFilterInput(),
      'faxnumber'    => new sfWidgetFormFilterInput(),
      'phonenumber'  => new sfWidgetFormFilterInput(),
      'mobilenumber' => new sfWidgetFormFilterInput(),
      'email'        => new sfWidgetFormFilterInput(),
      'webpage'      => new sfWidgetFormFilterInput(),
      'notes'        => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'cif'          => new sfValidatorPass(array('required' => false)),
      'name'         => new sfValidatorPass(array('required' => false)),
      'address'      => new sfValidatorPass(array('required' => false)),
      'contactcomm'  => new sfValidatorPass(array('required' => false)),
      'contactfact'  => new sfValidatorPass(array('required' => false)),
      'payrule'      => new sfValidatorPass(array('required' => false)),
      'faxnumber'    => new sfValidatorPass(array('required' => false)),
      'phonenumber'  => new sfValidatorPass(array('required' => false)),
      'mobilenumber' => new sfValidatorPass(array('required' => false)),
      'email'        => new sfValidatorPass(array('required' => false)),
      'webpage'      => new sfValidatorPass(array('required' => false)),
      'notes'        => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('thirdparties_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Thirdparties';
  }

  public function getFields()
  {
    return array(
      'id'           => 'Text',
      'cif'          => 'Text',
      'name'         => 'Text',
      'address'      => 'Text',
      'contactcomm'  => 'Text',
      'contactfact'  => 'Text',
      'payrule'      => 'Text',
      'faxnumber'    => 'Text',
      'phonenumber'  => 'Text',
      'mobilenumber' => 'Text',
      'email'        => 'Text',
      'webpage'      => 'Text',
      'notes'        => 'Text',
    );
  }
}
